<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div id="dialog-comment" title="发表评论" style="background:white">
  <div id="dialog-popup">
    <div class="sect">
      <s:form namespace="/" action="addReply" method="post" id="form-reply"
              theme="simple">
        <div class="field">
          <label for="txt_username">用户名</label>
          <s:textfield id="txt_username" size="10" name="username" readonly="true" value="${SESSION_USERNAME}"
                       cssClass="f-input"/>
        </div>
        <div class="field">
          <label>评分</label>

          <div class="ratings inline_block" style="cursor: pointer; margin:1px 0 1px 0;" tabindex="0">
            <div class="ratings_star ratings_star_on" onclick="doRating(1);"
                 title="1"></div>
            <div class="ratings_star ratings_star_on" onclick="doRating(2);"
                 title="2"></div>
            <div class="ratings_star ratings_star_on" onclick="doRating(3);"
                 title="3"></div>
            <div class="ratings_star ratings_star_on" onclick="doRating(4);"
                 title="4"></div>
            <div class="ratings_star ratings_star_on" onclick="doRating(5);"
                 title="5"></div>
          </div>
          <s:hidden id="rating_num" name="reply.rate" value="5"/>
          <input type="hidden" name="itemId" value="${item.id}"/>
        </div>
        <div class="field">
          <label for="txt_comment">评论内容</label>
          <s:textarea id="txt_comment" name="reply.message"
                      cssClass="f-textarea" cols="45" rows="5"/>
        </div>
        <s:submit name="commit" id="submit" cssClass="formsubmit"/>
      </s:form>
    </div>
  </div>
</div>